package com.edu.strDemo;

import cn.hutool.core.text.StrBuilder;

import java.io.*;

/**
 * @author five-five
 * @version 1.0
 * todo：
 * @date 2021/7/12 21:06
 */
public class MessageString {
    public static String messageStr = "";
    public static String filepath = "E:\\springBootWorkSpace\\testssm\\AlltestDemo\\src\\main\\resources\\报文.txt";

    static {
        try {
            StrBuilder strBuilder = new StrBuilder();
            //字符流
            BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(filepath)));
            char[] buffer = new char[1024 * 1024];
            String str = null;
            while ((str = (reader.readLine())) != null) {
                strBuilder.append(str);
            }
            messageStr = strBuilder.toString();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
